#pragma once
#include "NFA.h"
#include <string>
using std::string;
class RegFit
{
    DFA* dfa;
    NFA* nfa;
    bool parseG(size_t from, size_t to);
    bool parseF(size_t from, size_t to);
    bool parseM(size_t from, size_t to);
    bool parseT(size_t from, size_t to);
    map<char, size_t>character_id;
    map<string, size_t>ident_id;
    string::const_iterator ptr;
    string::const_iterator end;
public:
    RegFit();
    RegFit(string exp,map<char,string>mp);
    bool match(string s);
};

